﻿using IDAL;
using Model;
using System;
using System.Collections.Generic;
using System.Linq;

namespace DAL
{
    /// <summary>
    /// 登录
    /// </summary>
    public class UserInfoDAL : IUserInfoDAL
    {
        MyDBContext db = new MyDBContext();

        public List<UserInfo> ListLogin(string name, string pwd)
        {
            var list = new List<UserInfo>();
            if (!string.IsNullOrEmpty(name))
            {
                var pwds = "";
                list = list.Where(a => a.User_Name.Contains(name)).ToList();
                foreach (var item in list)
                {
                    pwds = item.User_Pwd;
                }
                if (pwd == pwds)
                {
                    return list;
                }
            }
            return null;
        }



    }
}
